#include "mykeybord.h"
#include "ui_mykeybord.h"

mykeybord::mykeybord(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::mykeybord)
{
    ui->setupUi(this);
    ui->quickWidget->setSource(QUrl("qrc:/mkeyboard.qml")); //把qml资源设置到QQUICKWIDGET上
    QObject * keyborad = (QObject*)ui->quickWidget->rootObject();
    connect(keyborad,SIGNAL(qmlsignal(QVariant)),this,SLOT(do_qmlsignal(QVariant)));
    connect(keyborad,SIGNAL(qmlclosesignal()),this,SLOT(close()));
}

mykeybord::~mykeybord()
{
    delete ui;
}

void mykeybord::do_qmlsignal(QVariant data)
{
    QString data_1 = data.toString();
    emit keyboradsignal(data_1);
}
